home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SUPRMANT.ARJ / SMUTIL.EXE / SAMPLE.SMF < prev    next >
Text File  |  1990-10-14  |  5KB  |  126 lines

  1. Anatomy of a SUPER-MAINT make file
  2. ----------------------------------
  3.  
  4. Here are the two macro sets used by this particular file (we are only
  5. compiling in one language (C), so we use that set of macros and the
  6. linker set of macros.  Chapter 3 explains a macro set.
  7.  
  8. L1CO = -c
  9. L1M1 = -AS
  10. L1M2 = -AM
  11. L1M3 = -AL
  12. L1ND = 
  13. L1D = -Zi -Od
  14. L1F1 = 
  15. L1F2 = 
  16. L2CO = 
  17. L2M1 = 
  18. L2M2 = 
  19. L2M3 = 
  20. L2ND = 
  21. L2D = -Zi
  22. L2F1 = 
  23. L2F2 = 
  24. LNCO = 
  25. LNM1 = 
  26. LNM2 = 
  27. LNM3 = 
  28. LNND = /E
  29. LND = /CO
  30. LNF1 = /NOE
  31. LNF2 = /ST:25000
  32. CPY = SAMPLE.C+SAMPLE1.C+SAMPLEA.ASM
  33. TNAMES = 
  34.         SAMPLE.OBJ&
  35.         SAMPLE1.OBJ&
  36.         SAMPLEA.OBJ
  37.  
  38. As long as notes don't have any of the symbols used in macros or action
  39. blocks in them, they don't need any special symbols or formatting.  Also,
  40. NOTES MUST NOT BE ON THE SAME LINE WITH A MACRO OR ACTION BLOCK.
  41.  
  42. SAMPLE.OBJ:  C:\CODE\SAMPLE.C
  43.          CL $(L1)  C:\CODE\SAMPLE.C
  44.  
  45. SAMPLE1.OBJ:  C:\CODE\SAMPLE1.C
  46.          CL $(L1)  C:\CODE\SAMPLE1.C
  47.  
  48. SAMPLEA.OBJ:  C:\CODE\SAMPLEA.ASM
  49.          MASM $(L2)  C:\CODE\SAMPLEA.ASM ;
  50.  
  51. Notice the semi-colon (;) at the end of the command line in the assembler
  52. action block.  This was placed there by the SUPER-MAINT Editor to prevent
  53. the assembler from stopping for responces during a build.  (This is user
  54. definable in the Setup Menu.
  55.  
  56.  
  57. sample.txt: placebo
  58.          COPY $(CPY) SAMPLE.TXT
  59.  
  60. The above action block deserves special notice for several reasons.  It
  61. is an example of an action block you might put in manually (the SUPER
  62. MAKE Editor does not generate action blocks using DOS commands).
  63.  
  64.        1.  It uses a DOS command on the action line.  SUPER-MAINT
  65.        supports these DOS commands (cd, chdir, chkdsk, cls, comp,
  66.        copy, del, dir, diskcomp, diskcopy, fc, find, format, mem,
  67.        mkdir, md, print, ren, remdir, rd, xcopy).
  68.  
  69.        2.  A Placebo has been used for the dependent.  This is any
  70.        word that doesn't represent an actual file.  This allows
  71.        SUPER-MAINT to execute the command on the second line of the
  72.        action block.  The first line of an action block MUST ALWAYS
  73.        have a target and a dependent.  The target is the file to be
  74.        created, the dependent is the file(s) it is created from.  You
  75.        may always use a placebo for the dependent.  If you do the 
  76.        command line will ALWAYS be executed, each time you make your
  77.        program.
  78.  
  79.        3.  No path was specified for the dependent.  SUPER-MAINT will
  80.        look for the dependent in the current (default) directory.
  81.  
  82.        4.  The target is not an object file, or an .exe, .com, or .bat
  83.        file.  SUPER-MAINT generates a message that it doesn't know where
  84.        you want the target file, and that it is putting it in the 
  85.        current (default) directory.
  86.  
  87.        5.  A user defined macro has been used (CPY).  The other way to
  88.        do this would be to put the whole command right on the command
  89.        line.  Example -- copy sample.c+sample1.c sample.txt
  90.        Either method is acceptable.  By the way you can add commands
  91.        directly to the command line on command lines that use macro
  92.        sets such as (L1).  Just type them after the (L) macro.  You can
  93.        also put user defined macros there if you want.  The only limit
  94.        is that the whole command line, including whatever is contained in 
  95.        macros may not exceed 128 characters.
  96.  
  97. sample.txt: c:\code\sample.c c:\code\sample1.c c:\code\samplea.asm
  98.          COPY $(CPY) SAMPLE.TXT
  99.  
  100. Here's the same action block without the placebo.  Notice the multiple 
  101. dependents.  SUPER-MAINT can handle up to 18 dependents in an action block
  102. (if there's room for them on a line).
  103.  
  104. SAMPLE.EXE: $(TNAMES)
  105.          LINK $(LN)  @SAMPLE.LNK
  106.  
  107.  
  108. Action blocks MUST be two lines with no blank lines in between them, as 
  109. shown above.
  110.  
  111. As you can see there is no special format for Notes except that they
  112. must not have the format of a macro or a target/dependent line.  The
  113. only trouble with using a LOT of notes is that it slows down the working 
  114. of SUPER-MAINT (although in my tests on an 80386/16 I haven't noticed
  115. any real difference in time.  I have been using this file for testing
  116. and you will agree it is quite verbose!).  So the rules for notes are-
  117.  
  118.        Always put notes on their own line in the file.  For
  119.        clarity's sake skip a line between notes and macros or
  120.        action blocks.
  121.  
  122.        Never use symbols in notes that are used in macros or
  123.        action blocks (equal sign, colon, dollar sign, etc).
  124.  
  125.        Be sparing with your notes.
  126.